package pers.sports.service.impl;

import org.springframework.stereotype.Service;
import pers.sports.dao.ScoreDao;
import pers.sports.service.ScoreService;
import pers.sports.vo.StuScore;

import java.util.List;

/**
 * score
 *
 * @datetime 2021/4/28 17:39
 */
@Service
public class ScoreServiceImpl implements ScoreService {

    private final ScoreDao scoreDao;

    public ScoreServiceImpl(ScoreDao scoreDao) {
        this.scoreDao = scoreDao;
    }

    @Override
    public List<StuScore> findScoreByProjectId(String projectId) {
        return scoreDao.findScoreByProjectId(projectId);
    }

    @Override
    public void deleteAll() {
        scoreDao.deleteAll();
    }

    @Override
    public void insertApplyId(String s) {
        scoreDao.insertApplyId(s);
    }

    @Override
    public Boolean updateScoreById(String field, String key, String value) {
        return scoreDao.updateScoreById(field,key,value)!=0?true:false;
    }
}
